const path = require('path')
const fs = require('fs')
const config = require('../../configure')

const bundle = JSON.parse(
  fs.readFileSync(
    path.resolve(config.serveOutpueDir, config.serveBundleFileName),
    'utf-8'
  )
)
const manifst = JSON.parse(
  fs.readFileSync(
    path.resolve(config.clientOutpueDir, config.clientManifestFileName),
    'utf-8'
  )
)

module.exports = {
  bundle,
  getManifest: () => manifst
}